﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Zzcore.Model
{
    [Table(Name = "rolepermission")]
    public class RolePermission
    {
        //[Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        //[JsonProperty("id")]
        //public long Id { get; set; }

        [Column(Name = "rid")]
        [JsonProperty("rid")]
        public long Rid { get; set; }

        [Column(Name = "pmid")]
        [Description("权限ID")]
        [JsonProperty("pmid")]
        public long Pmid { get; set; }

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0)")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0)")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
